package cn.springcloud.fix.demo.design.observer;

public class TestObserver {

    public static void main(String[] args) {
        LittleBoy boy1 = new LittleBoyImpl("小豪");
        LittleBoy boy2 = new LittleBoyImpl("小吴");

        Beauty beauty = new Beauty();
        beauty.addLittleBoy(boy1);
        beauty.addLittleBoy(boy2);

        // 发布朋友圈
        beauty.publishWechat("最美的不是下雨天，是曾和你一起躲过雨的屋檐！");
        // 再次发布朋友圈
        beauty.publishWechat("哪里有彩虹告诉我。。。");
    }
}
